//
//  main.c
//  cldemo1
//
//  Created by chenyh on 2021/1/22.
//

#include "stdio.h"

int add(int a,int b)
{
    printf("addition function\n");
    return a+b;
}

int sub(int a,int b)
{
    printf("subtration function\n");
    return a-b;
}
int main(void)
{
    int(*pf)(int,int);
    pf=add;
    printf("addition result:%d\n",pf(5,8));
    pf=sub;
    printf("subtration result:%d\n",pf(8,5));
    
    void *pfd = add;
    printf("addtion result:%d\n",((int (*)(int,int))pfd)(5,8));
    return 0;
}
